package com.example.controller;

import com.example.config.SplunkLog;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description:
 *
 * @Author maduar maduar@163.com
 * @Date 2021-08-02 23:24
 */
@RestController
@CrossOrigin
public class TestController {

    private static final Logger LOGGER = LogManager.getLogger(TestController.class);

    @GetMapping("/t1/{name}")
    public String t1(@PathVariable String name) {
        LOGGER.info("name: {}", name);
        return name;
    }

    @GetMapping("/t2/{name}")
    public String t2(@PathVariable String name) {
        LOGGER.info("name: {}", name);
        return name;
    }
}
